package cn.itsource.ymcc.feign;

import cn.itsource.ymcc.domain.Login;
import cn.itsource.ymcc.result.JSONResult;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class LoginFeignFallbackFactory implements FallbackFactory<LoginFeign> {
    @Override
    public LoginFeign create(Throwable throwable) {
        return new LoginFeign() {
            @Override
            public JSONResult save(Login login) {
                throwable.printStackTrace();
                return null;
            }
        };
    }
}
